import { NavOneComponent } from './route/entry/nav-one/nav-one.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
import { AdShComponent } from './coms/ad-sh/ad-sh.component';
import { ChatonlineComponent } from './coms/chatonline/chatonline.component';
import { RegisterShComponent } from './coms/register-sh/register-sh.component';
import { AboutUsPage } from './coms/settings-page/about-us.page';
import { SettingsPage } from './coms/settings-page/settings.page';
import { UrlComponent } from './coms/url/url.component';
import { SearchHistoryPage } from './search-history/search-history.page';
import { DetailsComponent } from './details/details.component';
import { LaiJianLoginComponent } from './laijian-login/laijian-login.component';
import { NewShopComponent } from './new-shop/new-shop.component';
const routes: Routes = [
    {
        path: 'wx',
        loadChildren: './tabs/tabs.module#TabsPageModule'
    },
    {
        path: '',
        loadChildren: './tabs/tabs.module#TabsPageModule'
    },
    {
        path: 'settingsPage',
        component: SettingsPage
    }, {
        path: 'aboutUsPage',
        component: AboutUsPage
    }, {
        path: 'navSearch',
        component: SearchHistoryPage
    }, {
        path: 'chatOnline',
        component: ChatonlineComponent
    },
    {
        path: 'ad-sh',
        component: AdShComponent
    }, {
        path: 'register-sh',
        component: RegisterShComponent
    },
    {
        path: 'navUrl',
        component: UrlComponent
    },
    {
        path: 'details',
        component: DetailsComponent
    },
    {
        path: 'newShop',
        component: NewShopComponent
    },
    {
        path: 'laijianLogin',
        component: LaiJianLoginComponent
    },
    {
        path: 'nav1',
        component: NavOneComponent
    },
    {
        path: 'nav2',
        component: NavOneComponent
    },
    {
        path: 'nav3',
        component: NavOneComponent
    },
    {
        path: 'nav4',
        component: NavOneComponent
    },
    {
        path: 'nav5',
        component: NavOneComponent
    },
    {
        path: 'nav6',
        component: NavOneComponent
    },
    {
        path: 'nav7',
        component: NavOneComponent
    },
    {
        path: 'nav8',
        component: NavOneComponent
    },
    {
        path: 'nav9',
        component: NavOneComponent
    },
    {
        path: 'nav10',
        component: NavOneComponent
    },
    {
        path: 'nav11',
        component: NavOneComponent
    },
    {
        path: 'nav12',
        component: NavOneComponent
    },
    {
        path: 'nav13',
        component: NavOneComponent
    },
    {
        path: 'nav14',
        component: NavOneComponent
    },
    {
        path: 'nav15',
        component: NavOneComponent
    },
    {
        path: 'nav16',
        component: NavOneComponent
    },
    {
        path: 'nav17',
        component: NavOneComponent
    },
    {
        path: 'nav18',
        component: NavOneComponent
    },
    {
        path: 'nav19',
        component: NavOneComponent
    },
    {
        path: 'nav20',
        component: NavOneComponent
    },
    {
        path: 'nav21',
        component: NavOneComponent
    },
    {
        path: 'home/tab1/details',
        component: DetailsComponent
    },
    {
        path: 'return_url',
        redirectTo: 'details', // 微信H5支付重定向到详情展示  小程序 支付完成 failParams 、successParams
        pathMatch: 'full'

      },
      {
        path: 'return_url_wxmin', // 小程序 传 wxLoginCode、用
        children: [
            {
              path: 'nav100', // 占位不会用的
              component: NavOneComponent
            }]
        },
  { path: 'qr-code-scanner', loadChildren: './qr-code-scanner/qr-code-scanner.module#QrCodeScannerPageModule' }

];

@NgModule({
    imports: [
        RouterModule.forRoot(
            routes,
            { preloadingStrategy: PreloadAllModules }
        )
    ],
    exports: [RouterModule]
})
export class AppRoutingModule {
}
